Skip to content

Conversation

@AnderData
Copy link

Description

Fixes: #4967

Type of Change

  • 🐛 Bug fix

Checklist

  • I have added/updated tests as needed
  • I have added/updated documentation where applicable
  • The PR title is descriptive
  • The code builds and passes tests locally
  • I have linked related issues (if any)

@daniel-kmiecik
Copy link
Collaborator

daniel-kmiecik commented Oct 6, 2025

@AnderData The added tests look good overall, but they don’t seem to cover all relevant combinations of annotations and types. It would be helpful to include additional cases to make sure the new behavior is fully validated.

Specifically, please consider adding tests for:

  • @NotNull combined with @notblank / @notempty (to confirm they still produce required = true);

  • Collection types (List, Set) annotated with @notempty, verifying that they generate appropriate schema constraints (e.g. minItems);

  • String fields annotated with both @notblank and @SiZe, ensuring that both restrictions are reflected in the resulting schema.

This would improve confidence that the change doesn’t introduce regressions or subtle differences in how these annotations interact.

@ewaostrowska ewaostrowska force-pushed the bug/4967-not-required-overrides-annotations branch from 9ce6b70 to 493878a Compare November 13, 2025 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: RequiredMode.NOT_REQUIRED is not respected by properties annotated with @NotBlank and @NotEmpty

3 participants